package com.th.supcom.pds.impl.manager.impl;

import java.util.List;
import java.util.Map;

import net.carefx.fc.framework.db.manager.GetSequenceHelper;

import org.apache.ibatis.session.RowBounds;

import com.th.supcom.pds.domain.pojo.PhamPropertyTable;
import com.th.supcom.pds.domain.vo.DrugInfoVO;
import com.th.supcom.pds.impl.dao.PhamPropertyTableMapper;
import com.th.supcom.pds.impl.manager.PhamPropertyTableManager;

/**
 * PhamPropertyTable 管理接口实现.
 * 
 * 主要用与药品在药库及药房的存在关系，病区的基数管理药品关系等。 .
 */
public class PhamPropertyTableManagerImpl implements PhamPropertyTableManager
{
    /** 公司版权信息. */
    public static final String copyright = "Copyright 2014, TH Supcom Corporation";

    /** 提交路径. */
    public static final String SCC_BRANCH = "$URL$";

    /** 提交日期. */
    public static final String SCC_LAST_MODIFICATION_DATE = "$Date$";

    /** 最终修改人员. */
    public static final String SCC_LAST_MODIFIER_NAME = "$Author$";

    /** 最终版本号. */
    public static final String SCC_REVISION = "$Revision$";

    public static final String TAB_PHAM_PROPERTY_TABLE = "PHAM_PROPERTY_TABLE";

    /** 序列生成器. */
    private GetSequenceHelper m_getSequenceHelper;

    private PhamPropertyTableMapper m_phamPropertyTableMapper;

    /**
     * 默认的构造函数.
     */
    public PhamPropertyTableManagerImpl ()
    {

    }

    @Override
    public void addPhamAllocationTable (final Long phamPropertySerialNo)
    {
        m_phamPropertyTableMapper.addPhamAllocationTable (phamPropertySerialNo);

    }

    @Override
    public void addPhamPropertyTable (final PhamPropertyTable phamPropertyTable)
    {
        m_phamPropertyTableMapper.addPhamPropertyTable (phamPropertyTable);
    }

    @Override
    public int findPhamPropertyTableCountByExample (final PhamPropertyTable phamPropertyTable)
    {
        return m_phamPropertyTableMapper.findPhamPropertyTableCountByExample (phamPropertyTable);
    }

    @Override
    public Integer findPhamPropertyTableCountByMap (final Map <String, Object> params)
    {
        return m_phamPropertyTableMapper.findPhamPropertyTableCountByMap (params);
    }

    @Override
    public Integer findPhamPropertyTableCountByName (final Map <String, Object> params)
    {

        return m_phamPropertyTableMapper.findPhamPropertyTableCountByName (params);

    }

    @Override
    public List <PhamPropertyTable> findPhamPropertyTableListByExample (final PhamPropertyTable phamPropertyTable)
    {
        return m_phamPropertyTableMapper.findPhamPropertyTableListByExample (phamPropertyTable);
    }

    @Override
    public List <PhamPropertyTable> findPhamPropertyTableListByMap (final Map <String, Object> params)
    {
        return m_phamPropertyTableMapper.findPhamPropertyTableListByMap (params);
    }

    @Override
    public List <DrugInfoVO> findPhamPropertyTableListWithPageByMap (final Map <String, Object> params, final Integer offset, final Integer limit)
    {
        return m_phamPropertyTableMapper.findPhamPropertyTableListWithPageByMap (new RowBounds (offset, limit), params);
    }

    @Override
    public List <DrugInfoVO> findPhamPropertyTableListWithPageByName (final RowBounds rowBounds, final Map <String, Object> params)
    {

        return m_phamPropertyTableMapper.findPhamPropertyTableListWithPageByName (rowBounds, params);

    }

    /**
     * 获取序列.
     * 
     * @return GetSequenceHelper
     */
    public GetSequenceHelper getGetSequenceHelper ()
    {
        return m_getSequenceHelper;
    }

    @Override
    public PhamPropertyTable getPhamPropertyTableByID (final Long id)
    {
        return m_phamPropertyTableMapper.getPhamPropertyTableByID (id);
    }

    /**
     * 获取PhamPropertyTableMapper.
     * 
     * @return PhamPropertyTableMapper.
     */
    public PhamPropertyTableMapper getPhamPropertyTableMapper ()
    {
        return m_phamPropertyTableMapper;
    }

    @Override
    public Long getPhamPropertyTableSeq ()
    {
        return m_getSequenceHelper.getNextSequenceId (PhamPropertyTableManagerImpl.TAB_PHAM_PROPERTY_TABLE);
    }

    @Override
    public int modifyPhamPropertyTable (final PhamPropertyTable phamPropertyTable)
    {
        return m_phamPropertyTableMapper.modifyPhamPropertyTable (phamPropertyTable);
    }

    @Override
    public int modifyPhamPropertyTableByExample (final PhamPropertyTable phamPropertyTable)
    {
        return m_phamPropertyTableMapper.modifyPhamPropertyTableByExample (phamPropertyTable);
    }

    @Override
    public int removePhamPropertyTableByID (final Long id)
    {
        return m_phamPropertyTableMapper.removePhamPropertyTableByID (id);
    }

    @Override
    public int removePhamPropertyTableByMap (final Map <String, Object> params)
    {
        return m_phamPropertyTableMapper.removePhamPropertyTableByMap (params);
    }

    /**
     * 注入序列.
     * 
     * @param getSequenceHelper getSequenceHelper.
     */
    public void setGetSequenceHelper (final GetSequenceHelper getSequenceHelper)
    {
        m_getSequenceHelper = getSequenceHelper;
    }

    /**
     * 注入PhamPropertyTableMapper.
     * 
     * @param phamPropertyTableMapper set phamPropertyTableMapper.
     */
    public void setPhamPropertyTableMapper (final PhamPropertyTableMapper phamPropertyTableMapper)
    {
        m_phamPropertyTableMapper = phamPropertyTableMapper;
    }

    @Override
    public Integer searchPhamPropertyTableCountByName (Map <String, Object> params)
    {
        return m_phamPropertyTableMapper.searchPhamPropertyTableCountByName (params);

    }

    @Override
    public List <DrugInfoVO> searchPhamPropertyTableListWithPageByName (RowBounds rowBounds, Map <String, Object> params)
    {

        return m_phamPropertyTableMapper.searchPhamPropertyTableListWithPageByName (rowBounds, params);

    }
}